Skip to content

Conversation

@RituMalav
Copy link

Summary

Adds a short note and minimal SecurityFilterChain example showing how to permit the OpenAPI and Swagger UI endpoints on the application port when Spring Security is enabled and Actuator runs on a separate management port.
Endpoints permitted: /v3/api-docs/**, /v3/api-docs.yaml, /swagger-ui/**, /swagger-ui.html.
Actuator security remains on the management port; this snippet applies only to the application port.

Why

With Spring Boot 3, OpenAPI endpoints and Swagger UI are served on the application port while Actuator runs on the management port. New users frequently see 404/401 for the docs when Spring Security is enabled unless these paths are explicitly permitted. This note removes that ambiguity.

What changed

  • README: under “Using a separate management port (Spring Boot 3)”
    • Added subsection “When Spring Security is enabled” with a minimal SecurityFilterChain snippet that permits:
      • /v3/api-docs/** (JSON endpoints)
      • /v3/api-docs.yaml (YAML root)
      • /swagger-ui/**
      • /swagger-ui.html
    • Added a Table of Contents entry pointing to the new subsection.

Scope

Docs-only; no code changes. Backwards compatible.

Related

Fixes #3149

@RituMalav
Copy link
Author

Hi! The external Jenkins failed before the build started. Log shows:

git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

It looks like Jenkins can’t clone the repo over SSH with the configured key. This is a docs-only PR (Fixes #3149). Could a maintainer please update Jenkins credentials (or switch the job to HTTPS) and re-run the job, or merge without CI?
“Allow edits by maintainers” is enabled—happy to adjust wording or placement. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: Spring Security note for management port: allow /v3/api-docs & Swagger UI (avoid 404/401)

1 participant